package org.example.springbootmybatisquickstart.Mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.springbootmybatisquickstart.pojo.User;

import java.util.List;

@Mapper
public interface UserMapper {

    /*
    * 查询所有用户
    * */
//    @Select("select * from user")
    public List<User> findAll();

    /*
    * 根据id查询用户
    * */
    @Select("select * from user where id = #{id}")
    public User findById(Integer id);

}
